package com.zzxy.spring34.dao.impl;

import com.zzxy.spring34.dao.IAccountDao;
import org.springframework.jdbc.core.support.JdbcDaoSupport;


public class AccountDaoImpl extends JdbcDaoSupport implements IAccountDao {
    @Override
    public void out(String outer, int money){
        this.getJdbcTemplate().update("update account set money=money-? where username=?",money,outer);
    }
    @Override
    public void in(String inner, int money){
        this.getJdbcTemplate().update("update account set money=money+? where username=?",money,inner);
    }
    /*public void setAccountDao(AccountDaoImpl accountDao) {
        this.accountDao = accountDao;
    }

    public AccountDaoImpl getAccountDao() {
        return accountDao;
    }

    @Override*/
}
